package com.prb.utils;

import java.sql.SQLException;

public class TransactionManager {


    //开启事务
    public static void beginTx() throws SQLException {

        ConnectionUtils.getConnection().setAutoCommit(false);

    }

    //提交事务
    public static void commit() throws SQLException {

        ConnectionUtils.getConnection().commit();
    }

    //回滚事务
    public static void rollback() throws SQLException {

        ConnectionUtils.getConnection().rollback();


    }

}
